#! /usr/bin/env python

from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext

import os
swdir = os.getcwd()+'/sw'

setup (
    cmdclass = {'build_ext': build_ext},
    ext_modules = [
        Extension("_simplematrix", ["simplematrix.i"], 
                swig_opts=['-c++', '-modern'], 
                include_dirs=[swdir+'/include'],
                libraries=['linbox', 'gmp', 'givaro', 'lapack', 'cblas'],
                library_dirs=[swdir+'/lib'],
        ),
        Extension("aggregate", ["aggregate.pyx"], define_macros=[('PYREX_WITHOUT_ASSERTIONS', 1)]),
        Extension("cache", ["cache.pyx"], define_macros=[('PYREX_WITHOUT_ASSERTIONS', 1)]),
        Extension("combinatorics", ["combinatorics.pyx"], define_macros=[('PYREX_WITHOUT_ASSERTIONS', 1)]),
        Extension("cycliclist", ["cycliclist.pyx"], define_macros=[('PYREX_WITHOUT_ASSERTIONS', 1)]),
        Extension("graph_homology", ["graph_homology.pyx"], define_macros=[('PYREX_WITHOUT_ASSERTIONS', 1)]),
        Extension("homology", ["homology.pyx"], define_macros=[('PYREX_WITHOUT_ASSERTIONS', 1)]),
        Extension("iterators", ["iterators.pyx"], define_macros=[('PYREX_WITHOUT_ASSERTIONS', 1)]),
        Extension("loadsave", ["loadsave.pyx"], define_macros=[('PYREX_WITHOUT_ASSERTIONS', 1)]),
        Extension("rational", ["rational.pyx"], define_macros=[('PYREX_WITHOUT_ASSERTIONS', 1)]),
        Extension("rg", ["rg.pyx"], define_macros=[('PYREX_WITHOUT_ASSERTIONS', 1)]),
        Extension("utils", ["utils.pyx"], define_macros=[('PYREX_WITHOUT_ASSERTIONS', 1)]),
        Extension("valences", ["valences.pyx"], define_macros=[('PYREX_WITHOUT_ASSERTIONS', 1)]),
        ]
)
